import  { createApp } from 'vue'
import './style.css'
import App from './App.vue'

createApp(App).mount('#app')

//1.字面量类型
let name: '广狗' = '广狗'
console.log(name);

//2.字面量+联合类型
type sex = '男' | '女'
let  mysex: sex = '男'
console.log(mysex );

//3.any类型
// 不会做类型校验,可以设置任意类型,后续使用可能没提示
let person: any = {
    name: '广狗',
    age: 18,
    sex: '男'

}
console.log(person);

// 类型声明文件:文件名+d.ts
//坑点:类型声明文件那边用type/interface声明的这边导入也需要声明type
import type { Food } from './types/data'
const f:Food  = {
    name: '苹果',
    date: '2023-05-05',
    color: 'red'
}
console.log(f);


